package com.wocao.mapper;

import com.wocao.entity.ZyOwnerRoomRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDateTime;

/**
 * <p>
 * 房屋绑定记录表  Mapper 接口
 * </p>
 *
 * @author gyh
 * @since 2023-12-12
 */
public interface ZyOwnerRoomRecordMapper extends BaseMapper<ZyOwnerRoomRecord> {
    @Update("UPDATE zy_owner_room_record set room_status = 1,record_audit_opinion=#{opinion},record_audit_type='Web',update_by=#{updateBy},update_time=#{updateTime} where owner_room_id = #{ownerRoomId}")
        //绑定成功
    void controlsOk(String ownerRoomId,String opinion,String updateBy,LocalDateTime updateTime);

    @Update("UPDATE zy_owner_room_record set room_status = 2,record_audit_opinion=#{opinion},record_audit_type='Web',update_by=#{updateBy},update_time=#{updateTime} where owner_room_id = #{ownerRoomId}")
        //绑定失败
    void controlsNo(String ownerRoomId, String opinion, String updateBy, LocalDateTime updateTime);
}
